<?php

namespace App\Modules\Admin\Entities\Mall;

use App\Models\Model;
use PhpParser\Node\Expr\AssignOp\Mod;

class GoodsOrderRefundModel extends Model
{

    protected $table='goods_order_refund';
    protected $primaryKey='id';
    protected $is_delete=0;


    public function orderInfo()
    {
        return $this->hasOne(GoodsOrderModel::class, 'id', 'order_id')->select(['create_time', 'remark', 'pay_status', 'pay_way']);
    }
    /**
     *  商城订单 退款
     * @param $orderId
     * @return mixed
     */
    public function getOrderRefund($orderId)
    {
        return $this->where(['order_id'=>$orderId])->get()->toArray();
    }
}
